home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 January: Mac OS SDK / Dev.CD Jan 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / CIncludes / CMMComponent.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-17  |  7.6 KB  |  262 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        CMMComponent.h
  3.  
  4.      Contains:    ColorSync CMM Component API
  5.  
  6.      Version:    Technology:    ColorSync 2.5
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __CMMCOMPONENT__
  18. #define __CMMCOMPONENT__
  19.  
  20. #ifndef __QUICKDRAW__
  21. #include <Quickdraw.h>
  22. #endif
  23. #ifndef __COMPONENTS__
  24. #include <Components.h>
  25. #endif
  26. #ifndef __CMAPPLICATION__
  27. #include <CMApplication.h>
  28. #endif
  29.  
  30.  
  31.  
  32. #if PRAGMA_ONCE
  33. #pragma once
  34. #endif
  35.  
  36. #ifdef __cplusplus
  37. extern "C" {
  38. #endif
  39.  
  40. #if PRAGMA_IMPORT
  41. #pragma import on
  42. #endif
  43.  
  44. #if PRAGMA_STRUCT_ALIGN
  45.     #pragma options align=mac68k
  46. #elif PRAGMA_STRUCT_PACKPUSH
  47.     #pragma pack(push, 2)
  48. #elif PRAGMA_STRUCT_PACK
  49.     #pragma pack(2)
  50. #endif
  51.  
  52.  
  53. enum {
  54.     CMMInterfaceVersion            = 1
  55. };
  56.  
  57. /* Component function selectors */
  58. /* Required */
  59.  
  60. enum {
  61.     kCMMInit                    = 0,
  62.     kNCMMInit                    = 6,
  63.     kCMMMatchColors                = 1,
  64.     kCMMCheckColors                = 2
  65. };
  66.  
  67. /* Optional */
  68.  
  69. enum {
  70.     kCMMValidateProfile            = 8,
  71.     kCMMFlattenProfile            = 14,
  72.     kCMMUnflattenProfile        = 15,
  73.     kCMMMatchBitmap                = 9,
  74.     kCMMCheckBitmap                = 10,
  75.     kCMMMatchPixMap                = 3,
  76.     kCMMCheckPixMap                = 4,
  77.     kCMMConcatenateProfiles        = 5,
  78.     kCMMConcatInit                = 7,
  79.     kCMMNewLinkProfile            = 16,
  80.     kCMMGetPS2ColorSpace        = 11,
  81.     kCMMGetPS2ColorRenderingIntent = 12,
  82.     kCMMGetPS2ColorRendering    = 13,
  83.     kCMMGetPS2ColorRenderingVMSize = 17,
  84.     kCMMGetNamedColorInfo        = 70,
  85.     kCMMGetNamedColorValue        = 71,
  86.     kCMMGetIndNamedColorValue    = 72,
  87.     kCMMGetNamedColorIndex        = 73,
  88.     kCMMGetNamedColorName        = 74
  89. };
  90.  
  91.  
  92. EXTERN_API( CMError )
  93. NCMInit                            (ComponentInstance         CMSession,
  94.                                  CMProfileRef             srcProfile,
  95.                                  CMProfileRef             dstProfile)                            FIVEWORDINLINE(0x2F3C, 0x0008, 0x0006, 0x7000, 0xA82A);
  96.  
  97. EXTERN_API( CMError )
  98. CMInit                            (ComponentInstance         CMSession,
  99.                                  CMProfileHandle         srcProfile,
  100.                                  CMProfileHandle         dstProfile)                            FIVEWORDINLINE(0x2F3C, 0x0008, 0x0000, 0x7000, 0xA82A);
  101.  
  102. EXTERN_API( CMError )
  103. CMMatchColors                    (ComponentInstance         CMSession,
  104.                                  CMColor *                myColors,
  105.                                  unsigned long             count)                                FIVEWORDINLINE(0x2F3C, 0x0008, 0x0001, 0x7000, 0xA82A);
  106.  
  107. EXTERN_API( CMError )
  108. CMCheckColors                    (ComponentInstance         CMSession,
  109.                                  CMColor *                myColors,
  110.                                  unsigned long             count,
  111.                                  long *                    result)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0002, 0x7000, 0xA82A);
  112.  
  113.  
  114. /* Optional functions */
  115. EXTERN_API( CMError )
  116. CMMValidateProfile                (ComponentInstance         CMSession,
  117.                                  CMProfileRef             prof,
  118.                                  Boolean *                valid)                                FIVEWORDINLINE(0x2F3C, 0x0008, 0x0008, 0x7000, 0xA82A);
  119.  
  120. EXTERN_API( CMError )
  121. CMMFlattenProfile                (ComponentInstance         CMSession,
  122.                                  CMProfileRef             prof,
  123.                                  unsigned long             flags,
  124.                                  CMFlattenUPP             proc,
  125.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x0010, 0x000E, 0x7000, 0xA82A);
  126.  
  127. EXTERN_API( CMError )
  128. CMMUnflattenProfile                (ComponentInstance         CMSession,
  129.                                  FSSpec *                resultFileSpec,
  130.                                  CMFlattenUPP             proc,
  131.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x000F, 0x7000, 0xA82A);
  132.  
  133. EXTERN_API( CMError )
  134. CMMatchBitmap                    (ComponentInstance         CMSession,
  135.                                  const CMBitmap *        bitmap,
  136.                                  CMBitmapCallBackUPP     progressProc,
  137.                                  void *                    refCon,
  138.                                  CMBitmap *                matchedBitmap)                        FIVEWORDINLINE(0x2F3C, 0x0010, 0x0009, 0x7000, 0xA82A);
  139.  
  140. EXTERN_API( CMError )
  141. CMCheckBitmap                    (ComponentInstance         CMSession,
  142.                                  const CMBitmap *        bitmap,
  143.                                  CMBitmapCallBackUPP     progressProc,
  144.                                  void *                    refCon,
  145.                                  CMBitmap *                resultBitmap)                        FIVEWORDINLINE(0x2F3C, 0x0010, 0x000A, 0x7000, 0xA82A);
  146.  
  147. EXTERN_API( CMError )
  148. CMMatchPixMap                    (ComponentInstance         CMSession,
  149.                                  PixMap *                myPixMap,
  150.                                  CMBitmapCallBackUPP     progressProc,
  151.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0003, 0x7000, 0xA82A);
  152.  
  153. EXTERN_API( CMError )
  154. CMCheckPixMap                    (ComponentInstance         CMSession,
  155.                                  const PixMap *            myPixMap,
  156.                                  CMBitmapCallBackUPP     progressProc,
  157.                                  BitMap *                myBitMap,
  158.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x0010, 0x0004, 0x7000, 0xA82A);
  159.  
  160. EXTERN_API( CMError )
  161. CMConcatInit                    (ComponentInstance         CMSession,
  162.                                  CMConcatProfileSet *    profileSet)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
  163.  
  164. EXTERN_API( CMError )
  165. CMNewLinkProfile                (ComponentInstance         CMSession,
  166.                                  CMProfileRef *            prof,
  167.                                  const CMProfileLocation * targetLocation,
  168.                                  CMConcatProfileSet *    profileSet)                            FIVEWORDINLINE(0x2F3C, 0x000C, 0x0010, 0x7000, 0xA82A);
  169.  
  170. EXTERN_API( CMError )
  171. CMMGetPS2ColorSpace                (ComponentInstance         CMSession,
  172.                                  CMProfileRef             srcProf,
  173.                                  unsigned long             flags,
  174.                                  CMFlattenUPP             proc,
  175.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x0010, 0x000B, 0x7000, 0xA82A);
  176.  
  177. EXTERN_API( CMError )
  178. CMMGetPS2ColorRenderingIntent    (ComponentInstance         CMSession,
  179.                                  CMProfileRef             srcProf,
  180.                                  unsigned long             flags,
  181.                                  CMFlattenUPP             proc,
  182.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x0010, 0x000C, 0x7000, 0xA82A);
  183.  
  184. EXTERN_API( CMError )
  185. CMMGetPS2ColorRendering            (ComponentInstance         CMSession,
  186.                                  CMProfileRef             srcProf,
  187.                                  CMProfileRef             dstProf,
  188.                                  unsigned long             flags,
  189.                                  CMFlattenUPP             proc,
  190.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x0014, 0x000D, 0x7000, 0xA82A);
  191.  
  192. EXTERN_API( CMError )
  193. CMMGetPS2ColorRenderingVMSize    (ComponentInstance         CMSession,
  194.                                  CMProfileRef             srcProf,
  195.                                  CMProfileRef             dstProf,
  196.                                  unsigned long *        vmSize)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0011, 0x7000, 0xA82A);
  197.  
  198. EXTERN_API( CMError )
  199. CMConcatenateProfiles            (ComponentInstance         CMSession,
  200.                                  CMProfileHandle         thru,
  201.                                  CMProfileHandle         dst,
  202.                                  CMProfileHandle *        newDst)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0005, 0x7000, 0xA82A);
  203.  
  204. /* Named Color functions */
  205. EXTERN_API( CMError )
  206. CMMGetNamedColorInfo            (ComponentInstance         CMSession,
  207.                                  CMProfileRef             srcProf,
  208.                                  unsigned long *        deviceChannels,
  209.                                  OSType *                deviceColorSpace,
  210.                                  OSType *                PCSColorSpace,
  211.                                  unsigned long *        count,
  212.                                  StringPtr                 prefix,
  213.                                  StringPtr                 suffix)                                FIVEWORDINLINE(0x2F3C, 0x001C, 0x0046, 0x7000, 0xA82A);
  214.  
  215. EXTERN_API( CMError )
  216. CMMGetNamedColorValue            (ComponentInstance         CMSession,
  217.                                  CMProfileRef             prof,
  218.                                  StringPtr                 name,
  219.                                  CMColor *                deviceColor,
  220.                                  CMColor *                PCSColor)                            FIVEWORDINLINE(0x2F3C, 0x0010, 0x0047, 0x7000, 0xA82A);
  221.  
  222. EXTERN_API( CMError )
  223. CMMGetIndNamedColorValue        (ComponentInstance         CMSession,
  224.                                  CMProfileRef             prof,
  225.                                  unsigned long             index,
  226.                                  CMColor *                deviceColor,
  227.                                  CMColor *                PCSColor)                            FIVEWORDINLINE(0x2F3C, 0x0010, 0x0048, 0x7000, 0xA82A);
  228.  
  229. EXTERN_API( CMError )
  230. CMMGetNamedColorIndex            (ComponentInstance         CMSession,
  231.                                  CMProfileRef             prof,
  232.                                  StringPtr                 name,
  233.                                  unsigned long *        index)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0049, 0x7000, 0xA82A);
  234.  
  235. EXTERN_API( CMError )
  236. CMMGetNamedColorName            (ComponentInstance         CMSession,
  237.                                  CMProfileRef             prof,
  238.                                  unsigned long             index,
  239.                                  StringPtr                 name)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x004A, 0x7000, 0xA82A);
  240.  
  241.  
  242. #if PRAGMA_STRUCT_ALIGN
  243.     #pragma options align=reset
  244. #elif PRAGMA_STRUCT_PACKPUSH
  245.     #pragma pack(pop)
  246. #elif PRAGMA_STRUCT_PACK
  247.     #pragma pack()
  248. #endif
  249.  
  250. #ifdef PRAGMA_IMPORT_OFF
  251. #pragma import off
  252. #elif PRAGMA_IMPORT
  253. #pragma import reset
  254. #endif
  255.  
  256. #ifdef __cplusplus
  257. }
  258. #endif
  259.  
  260. #endif /* __CMMCOMPONENT__ */
  261.  
  262.